import request from '@/utils/Request'
import { stringify } from 'qs';

export async function queryById(params) {
  return request(`/joker/users/queryById?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function userAction(params) {
  return request('/joker/userAction/add', {
    method: 'POST',
    data: {
      ...params
    }
  });
}

export async function getCurrentUser() {
  return request(`/joker/users/getCurrentUser`, {
    method: 'GET'
  });
}

export async function cancelFollow(params) {
  return request(`/joker/userAction/cancelFollow?${stringify(params)}`, {
    method: 'GET'
  });
}
